[rust] set useAsyncFileStream only for files in the body#21839
Conversation
|
thanks for the PR is it possible to add a new workflow (or updating the exiting one) to catch the issue moving forward? |
|
@wing328 Which workflow are you referring to? I'm not sure how we could catch this issue. Maybe we could call |
|
Ah I just saw that some tests are disabled in this workflow: . |
|
@wing328 Since there's no such test (making sure the build doesn't produce any warning) today, if I add it in this PR, I risk having to fix all sorts of errors introduced before and that are not related to this PR. So maybe we can open another issue to add this workflow? |
|
agreed. i'll take a look over the weekend to see why the rust client tests are skipped. have you tested this fix locally in your environment to confirm it fixes the mentioned issue? if yes, i'll get it merged so that more users can test the change after merge |
|
@wing328 Yes I tested it locally on my own project and it works on the petstore samples too. |
|
fyi. rust client ci fixed via #21851 |
…ools#21839) Co-authored-by: Thomas Ville <thomas.ville@aerys.in>
In a previous PR ([Rust ]Add async file stream support for reqwest client): the
useAsyncFileStreamandvendorExtensions.useAsyncFileStreamtemplate variables are used in case there's at least one file uploaded in the body, but they are set as long assupportAsyncis set and any parameter is a file (including if the file is in a form). So these variables are set more often than they should, introducing unused dependencies ontokio.This explains why on
master, these tests have thetokiodependency even though they don't use it:This PR sets the
useAsyncFileStreamandvendorExtensions.useAsyncFileStreamtemplate variables only when at least one body parameter is a file.This PR doesn't break the feature introduced by [Rust ]Add async file stream support for reqwest client, as can be seen in the
samples/client/others/rust/reqwest/file-streamingexample.PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
master(upcoming7.x.0minor release - breaking changes with fallbacks),8.0.x(breaking changes without fallbacks)"fixes #123"present in the PR description)@frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) @dsteeley (2025/07)